<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    <!-- 国内使用 -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/amazeui/2.7.2/css/amazeui.min.css">
    <script type="text/javascript" charset="utf-8" src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/sd/nch5/index.js?t=2015052012"></script>
    <!-- 若您的主要用户来源于海外，请替换使用下面的js资源 -->
    <!-- <script type="text/javascript" charset="utf-8" src="//aeis.alicdn.com/sd/nch5/index.js?t=2015052012"></script> -->
    <style>
        .am-form{
            padding: 10px;
        }
        ._nc .stage1 .slider{
            left: 0;
            right: 0;
        }
    </style>
</head>
<body>

<div class="am-form">
    <div class="am-form-group">
        <label for="lastCode">上期回顾</label>
        <input type="text" class="" readonly id="lastCode" placeholder="请输入手机号">
    </div>

    <div id="__nc" style="height: 70px">
        <div id="nc"></div>
    </div>

    <div class="am-form-group">
        <label for="code">本期一等奖神秘号码</label>
        <input id="code" type="text" readonly placeholder="请输入验证码">
    </div>

    <button type="button" class="am-btn am-btn-primary" onclick="getData()">生成</button>
</div>

<script>

    function getData() {
        $.ajax({
            url:"/realizeDream/getMysteriousCode",
            type:"get",
            success:function (result) {
                $("#code").val(result)
            },
            error:function (rel) {
            }
        })
    }
    $(function () {

        $.ajax({
            url:"/realizeDream/getMysteriousCode",
            type:"get",
            async: false,
            success:function (result) {
                $("#lastCode").val(result)
            },
            error:function (rel) {
            }
        })


    });
</script>
</body>
</html>